/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.bean.User;
/*    */ import com.newcrm.db.DealFieldManager;
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.util.Util;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.util.List;
/*    */ import javax.servlet.RequestDispatcher;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ 
/*    */ public class ListDeals extends AbstractAction
/*    */ {
/* 22 */   private static Logger logger = Logger.getLogger(ListDeals.class.getName());
/*    */ 
/*    */   public ListDeals(AbstractHttpServlet servlet) {
/* 25 */     super(servlet);
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 31 */     User user = super.getLoginUser(request);
/* 32 */     DealFieldManager manager = new DealFieldManager();
/*    */     try {
/* 34 */       List fields = manager.list(user.companyId);
/* 35 */       request.setAttribute("fields", fields);
/*    */     } catch (Exception e) {
/* 37 */       logger.warn("get deal fields failed", e);
/*    */     }
/*    */ 
/* 40 */     String dealStatus = Util.getURLParameter(request
/* 41 */       .getParameter("dealStatus"));
/* 42 */     if (dealStatus == null) {
/* 43 */       dealStatus = "";
/*    */     }
/* 45 */     request.setAttribute("dealStatus", dealStatus);
/* 46 */     request.getRequestDispatcher("/deals.jsp").forward(request, response);
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.ListDeals
 * JD-Core Version:    0.6.1
 */